package com.shazhu.nongjt.service.impl;

import java.util.List;
import com.shazhu.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.shazhu.nongjt.mapper.NjtInspectionPhotoMapper;
import com.shazhu.nongjt.domain.NjtInspectionPhoto;
import com.shazhu.nongjt.service.INjtInspectionPhotoService;

/**
 * 检查记录照片关联Service业务层处理
 * 
 * @author shazhu
 * @date 2025-09-29
 */
@Service
public class NjtInspectionPhotoServiceImpl implements INjtInspectionPhotoService 
{
    @Autowired
    private NjtInspectionPhotoMapper njtInspectionPhotoMapper;

    /**
     * 查询检查记录照片关联
     * 
     * @param id 检查记录照片关联主键
     * @return 检查记录照片关联
     */
    @Override
    public NjtInspectionPhoto selectNjtInspectionPhotoById(Long id)
    {
        return njtInspectionPhotoMapper.selectNjtInspectionPhotoById(id);
    }

    /**
     * 查询检查记录照片关联列表
     * 
     * @param njtInspectionPhoto 检查记录照片关联
     * @return 检查记录照片关联
     */
    @Override
    public List<NjtInspectionPhoto> selectNjtInspectionPhotoList(NjtInspectionPhoto njtInspectionPhoto)
    {
        return njtInspectionPhotoMapper.selectNjtInspectionPhotoList(njtInspectionPhoto);
    }

    /**
     * 新增检查记录照片关联
     * 
     * @param njtInspectionPhoto 检查记录照片关联
     * @return 结果
     */
    @Override
    public int insertNjtInspectionPhoto(NjtInspectionPhoto njtInspectionPhoto)
    {
        njtInspectionPhoto.setCreateTime(DateUtils.getNowDate());
        return njtInspectionPhotoMapper.insertNjtInspectionPhoto(njtInspectionPhoto);
    }

    /**
     * 修改检查记录照片关联
     * 
     * @param njtInspectionPhoto 检查记录照片关联
     * @return 结果
     */
    @Override
    public int updateNjtInspectionPhoto(NjtInspectionPhoto njtInspectionPhoto)
    {
        return njtInspectionPhotoMapper.updateNjtInspectionPhoto(njtInspectionPhoto);
    }

    /**
     * 批量删除检查记录照片关联
     * 
     * @param ids 需要删除的检查记录照片关联主键
     * @return 结果
     */
    @Override
    public int deleteNjtInspectionPhotoByIds(Long[] ids)
    {
        return njtInspectionPhotoMapper.deleteNjtInspectionPhotoByIds(ids);
    }

    /**
     * 删除检查记录照片关联信息
     * 
     * @param id 检查记录照片关联主键
     * @return 结果
     */
    @Override
    public int deleteNjtInspectionPhotoById(Long id)
    {
        return njtInspectionPhotoMapper.deleteNjtInspectionPhotoById(id);
    }
}
